<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ProjectMadaktariMVC.Models.Patient>" %>
<div class="patientInformation">
    <span class="editLink">
        <%= Html.ActionLink("Edit Information", "Edit", new {id = Model.Id}) %></span>
    <span class="patientName">
        <%= Model.FirstName + " " + Model.LastName %></span><br />
    <div class="block1">
        <%= Model.Gender %><br />
        DOB:
        <%= (Model.DateOfBirth == null ? "--" : ((DateTime)Model.DateOfBirth).ToString("MMM dd, yyyy")) %><br />
        Registration Number:
        <%= Model.RegistrationNumber %>
    </div>
    <div class="block2">
        Cell Phone:
        <%= Model.CellNumber %><br />
        Tribes:
        <%
            Response.Write(
                Model.Tribe1.Name == null 
                ? "--" 
                : Model.Tribe1.Id == -1
                    ? Model.CustomTribe1
                    : Model.Tribe1.Name
            );
            if (Model.Tribe2 != null)
            {
                Response.Write(", " 
                    + (Model.Tribe2.Id == -1
                        ? Model.CustomTribe2
                        : Model.Tribe2.Name));
            }
        %>
    </div>
</div>
